import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      // 必填
      path: '/',
      //省略
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('../views/AboutView.vue'),
    },
    {
      path: '/help1',
      redirect:'/about',
      component: () => import('../views/HelpView.vue'),
    },
    {
      path: '/money',
      meta:{
        login:1
      },
      component: () => import('../views/MoneyView.vue'),
    }
  ]
})

export default router
